import Setting from "../config/Setting";
import BaseView from "./BaseView";
import * as vscode from 'vscode';

export default class OutputView extends BaseView{
    constructor() {
        super();
        this._opc = vscode.window.createOutputChannel(this.optputName);
    }

    private readonly optputName = "fishreader";
    private _opc: vscode.OutputChannel;

    public init(): boolean {
        return true;
    }

    public show(msg: string[]): void {
        this._opc.clear();
        this._opc.appendLine(msg.join("\n"));
        this._opc.show();
    }

    public hide(): void {
        this._opc.clear();
        this._opc.hide();
    }

    public getLineNum(): number {
        return Setting.pageLine;
    }
}